﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wintellect.PowerCollections;

namespace PriorityQueue
{
    class PriorityQueue<T>
    {
        OrderedBag<T> Bag { get; set; }

        public PriorityQueue()
        {
            this.Bag = new OrderedBag<T>();
        }

        public void Add(T element)
        {
            this.Bag.Add(element);
        }

        public void Clear()
        {
            this.Bag.Clear();
        }

        public bool Contains(T element)
        {
            return this.Bag.Contains(element);
        }

        public int Count()
        {
            return this.Bag.Count();
        }

        public int IndexOf(T element)
        {
            return this.Bag.IndexOf(element);
        }

        public void Remove(T element)
        {
            this.Bag.Remove(element);
        }

        public T this[int index]
        {
            get
            {
                return this.Bag[index];
            }
        }
    }
}
